<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 600px;
            height: 600px;
            border: 1px solid red;
            margin: 30px auto;
        }
        .box>div {
            width: 100px;
            height: 100px;
            position: relative;
        }
        .box>div:nth-child(1) {
            background-color: red;
            z-index: 5;
        }
        .box>div:nth-child(2) {
            background-color: beige;
            top: -50px;
            left: 50px;
            z-index: 4;
        }
        .box>div:nth-child(3) {
            background-color: chartreuse;
            top: -100px;
            right: -100px;
            z-index: 3;
        }
        .box>div:nth-child(4) {
            background-color: fuchsia;
            bottom: 150px;
            left: 150px;
            z-index: 2;
        }
        .box>div:nth-child(5) {
            background-color: gold;
            bottom: 200px;
            right: -200px;
            z-index: 1;
        }
    </style>
</head>
<body>
    <div class="box">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </div>
</body>
</html>